Skip to content

fix(tests): reclaim read-only pytest temporary trees - #9189

Merged
loopx-agent merged 1 commit into
mainfrom
codex/fix-pytest-temp-cleanup-permissions-20261121
Nov 21, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/fix-pytest-temp-cleanup-permissions-20261121

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Follow-up for #9070 after the merged pytest temporary-directory cleanup.

This repairs the blocking review finding:

  • restore owner access inside the test-owned tree after a failed removal
  • skip symlinks, junctions, and multiply-linked files
  • stop emitting PytestWarning from pytest hooks so -W error cannot become INTERNALERROR
  • report cleanup failures through the terminal summary instead
  • add a 0o444 file / 0o555 directory regression under -W error

Validation:

  • 15 passed, 1 skipped in tests/test_managed_effect_runtime_fixture.py
  • 71 passed across the three migrated case_mktemp consumers
  • focused Ruff import/error checks passed
  • git diff --check passed

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · self-review · exact head 6ce24f52bb85df17ae73fe12d656f7c95f12afb8

Approval conclusion (author-owned PR; GitHub blocks formal self-approval).

The follow-up repairs the blocking finding in #9070: a failed temporary-tree removal now restores owner access only inside the test-owned tree, skips symlinks, junctions, and multiply-linked files, then retries. Cleanup errors no longer emit PytestWarning from pytest hooks, so -W error cannot turn best-effort cleanup into INTERNALERROR; failures are reported in the terminal summary instead.

Validation: tests/test_managed_effect_runtime_fixture.py passed 15 with 1 skip; the three migrated case_mktemp consumers passed 71; the new 0o444 file / 0o555 directory regression passed under -W error; focused Ruff checks and git diff --check passed.

@loopx-agent
loopx-agent merged commit a1d1e7c into main Nov 21, 2026
5 of 6 checks passed
@loopx-agent
loopx-agent deleted the codex/fix-pytest-temp-cleanup-permissions-20261121 branch November 21, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant